<!DOCTYPE html>
<html>
<head>
</head>
<body ng-controller="UserListController">
	<div ng:init="$root.pageTitle = 'Users'"/>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">Users</h3>
		</div>
		<div class="panel-body">
			<table id="users" class="table table-striped table-bordered">
				<thead>
					<tr>
						<th>Username</th>
						<th>Email</th>
						<th>Role</th>
						<th>Action</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="user in users">
						<td><a href="#" ng-click="setCurrentUser(user)">{{user.username}}</a></td>
						<td>{{user.email}}</td>
						<td>{{user.role}}</td>
						<td>
							<button id="edit" name="edit" class="btn btn-primary"
								ng-click="editUser(user)" title="Edit {{user.username}}">
								<span class="glyphicon glyphicon-pencil" />
							</button>
							<button id="delete" name="delete" class="btn btn-primary"
								ng-click="deleteUser(user)" title="Delete {{user.username}}">
								<span class="glyphicon glyphicon-remove" />
							</button>
						</td>
					</tr>
				</tbody>
			</table>
			<a id="addUser" name="addUser" class="btn btn-primary"
				href="#/user" title="Add user">Add User</a>
		</div>
	</div>
</body>